#ifndef UDPREADER_H
#define UDPREADER_H

#include <Winsock2.h>

class UDPReader
{
public:
	UDPReader(SOCKET socket);
	UDPReader(const char *addr, int port);
	~UDPReader();
	int read(char* buf, int len, sockaddr_in* from, int* fromlen);
	int read(char* buf, int len, char* ip, int* port);
	void close();
private:
	SOCKET m_socket;

};

#endif
